var status = -1;
var selectionLog = [];

function start() {
    action(1, 0, 0)
}

function action(f, d, c) {
    if (status == 0 && f == 0) {
        cm.dispose();
        return
    }(f == 1) ? status++ : status--;
    selectionLog[status] = c;
    var b = -1;
    var e = cm.getNumberFromQuestInfo(16192, "pyramidScore");
    var a = cm.getNumberFromQuestInfo(16192, "pyramidRank");
    if (status <= b++) {
        cm.dispose()
    } else {
        if (status === b++) {
            if (a == 0) {
                cm.sendNormalTalk_Bottom("恭喜你取得了胜利YO！\r\n这次！给你#b" + e * Math.pow(1.5, 3 - a) + "#k新复古能量#kYO！\r\n（奖励将在离开时发放。）", 37, 9062181, false, true, 3)
            } else {
                cm.sendNormalTalk_Bottom("很可惜，希望你下次能够获胜YO！\r\n这次！给你#b" + e * Math.pow(1.5, 3 - a) + "#k新复古能量#kYO！\r\n（奖励将在离开时发放。）", 37, 9062181, false, true, 3)
            }
        } else {
            cm.新复古王国_获得点数(e * Math.pow(1.5, 3 - a));
            cm.setNumberForQuestInfo(16192, "pyramidScore", 0);
            cm.setNumberForQuestInfo(16192, "pyramidRank", 0);
            cm.warp(993110000, 5, false);
            cm.dispose()
        }
    }
};